package com.homework.mergesort;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

public class MapperMS extends Mapper<LongWritable, Text, MSBean, NullWritable> {

    @Override
    protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
        //读取的每一行数据作为map阶段的输出
        context.write(new MSBean(Integer.parseInt(value.toString())), NullWritable.get());
    }
}
